package com;

import com.pojo.Customer;
import com.utils.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.jupiter.api.Test;

import java.util.List;

public class StudentMapper {
    @Test
    public void findByArrayTest() {
        try (SqlSession sqlSession = MyBatisUtils.getSession()) {
            Integer[] roleIds = {2, 3};
            List<Customer> customers = sqlSession.selectList("com.mapper.CustomerMapper.findByArray", roleIds);
            for (Customer cust : customers) {
                System.out.println(cust);
            }
            // 对于查询操作，不需要调用 commit
        }
    }
}
